package com.zhiche.lisa.lspm.dao.mapper.driver;


import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.zhiche.lisa.lspm.dao.model.driver.DriverLicenseAttach;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 司机证照附件 Mapper 接口
 * </p>
 *
 * @author qichao
 * @since 2018-05-23
 */
public interface DriverLicenseAttachMapper extends BaseMapper<DriverLicenseAttach> {
    /**
     * 根据证照id和司机id获取
     * @param driverLicenseId
     * @return
     */
    DriverLicenseAttach selectByDriverLicenseId(@Param("driverLicenseId") Long driverLicenseId,@Param("driverId") Long driverId,@Param("attachType") String attachType);

    Integer updateToDelete(@Param("ew")EntityWrapper<DriverLicenseAttach> ew);

    /**
     * 查询已经删除的附件
     * @param ew
     * @return
     */
    List<DriverLicenseAttach> selectDeleteList(@Param("ew")EntityWrapper<DriverLicenseAttach> ew);

    /**
     * 删除附件根据id
     * @param id
     * @return
     */
    Integer deleteOneById(@Param("id") Long id);
}
